package com.fuxue.controller.server;

import com.fuxue.dto.LikeDTO;
import com.fuxue.result.Result;
import com.fuxue.service.LikeService;
import com.fuxue.vo.ALLDetialsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/users/server/forum/like")
@Slf4j
@Api(tags = "服务者点赞")
public class LikeController {
    @Autowired
    private LikeService likeService;

    /*
     点赞
    */
    @PostMapping("/LikeforALL")

    @ApiOperation("对论坛知识贴/回答贴点赞")
    private Result LikeForAll(@RequestBody LikeDTO likeDTO)
    {
        log.info("论坛点赞，参数为：{}",likeDTO);
        likeService.Insert(likeDTO);

        return Result.success();
    }
}
